package com.cskaoyan.mapper;

import com.cskaoyan.bean.MallStorage;
import com.cskaoyan.bean.MallStorageExample;
import com.cskaoyan.model.bo.PageBo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MallStorageMapper {
    long countByExample(MallStorageExample example);

    int deleteByExample(MallStorageExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(@Param("record") MallStorage record);

    int insertSelective(MallStorage record);

    List<MallStorage> selectByExample(MallStorageExample example);

    MallStorage selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MallStorage record, @Param("example") MallStorageExample example);

    int updateByExample(@Param("record") MallStorage record, @Param("example") MallStorageExample example);

    int updateByPrimaryKeySelective(MallStorage record);

    int updateByPrimaryKey(MallStorage record);

    /**
     * 删除对象，修改对象的deleted为TRUE
     *
     * @param id
     * @param name
     * @return
     */
    Integer updateById(@Param("id") Integer id, @Param("name") String name);

    /**
     * 根据条件分页查询
     *
     * @param pageBo
     * @param key
     * @param name
     * @return
     */
    List<MallStorage> selectAllList(@Param("pageBo") PageBo pageBo, @Param("key") String key, @Param("name") String name);
}
